#!/bin/bash
echo
echo Checking if the comments in the .cpp files are accurate.
echo
echo
echo Vector.cpp:
grep "\/\/\!" Vector.cpp | sed "s, *//\! ,," > check_comments_junk1
vector > check_comments_junk2
if [ `diff check_comments_junk1 check_comments_junk2 | wc -l` -gt 0 ]; then
    echo '   Found some differences:'
    echo
    diff check_comments_junk1 check_comments_junk2
else
    echo '   No differences'
fi
echo 
echo 
echo Matrix.cpp:
grep "\/\/\!" Matrix.cpp | sed "s, *//\! ,," > check_comments_junk1
matrix > check_comments_junk2
if [ `diff check_comments_junk1 check_comments_junk2 | wc -l` -gt 0 ]; then
    echo '   Found some differences:'
    echo
    diff check_comments_junk1 check_comments_junk2
else
    echo '   No differences'
fi
echo
echo
echo Division.cpp:
grep "\/\/\!" Division.cpp | sed "s, *//\! ,," > check_comments_junk1
division > check_comments_junk2
if [ `diff check_comments_junk1 check_comments_junk2 | wc -l` -gt 0 ]; then
    echo '   Found some differences:'
    echo
    diff check_comments_junk1 check_comments_junk2
else
    echo '   No differences'
fi
echo
echo
/bin/rm check_comments_junk1 check_comments_junk2
